package com.xinjiang.electricpower.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.xinjiang.electricpower.domain.DTO.PsmWorkOrderDTO;
import com.xinjiang.electricpower.domain.DTO.VoucherDTO;
import com.xinjiang.electricpower.domain.PsmWorkOrder;
import com.xinjiang.electricpower.domain.vo.PsmWorkOrderDetailVO;
import com.xinjiang.electricpower.domain.vo.PsmWorkOrderVO;

import java.util.List;

/**
 * @author feizhao
 * @date 2022/11/9
 * @apiNote 派工单接口
 */
public interface IPsmWorkOrderService extends IService<PsmWorkOrder> {
    /**
     * 分页查询
     *
     * @param psmWorkOrderDTO 派工单DTO类
     * @param pageDTO         分页Dto对象
     * @return PageInfo<PsmWorkOrderVO> 返回分页工单VO类数据
     */
    PageInfo<PsmWorkOrderVO> selectPsmWorkOrdersPage(PageDTO<PsmWorkOrderVO> pageDTO, PsmWorkOrderDTO psmWorkOrderDTO);

    /**
     * 查询总数
     *
     * @return Long
     */
    Long countDispatchWorkOrder();

    /**
     * 查询派工单列表无分页
     *
     * @param psmWorkOrderDTO 派工单DTO类
     * @return List<PsmWorkOrderVO> 返回派工单列表
     */
    List<PsmWorkOrderVO> selectPsmWorkOrders(PsmWorkOrderDTO psmWorkOrderDTO);

    /**
     * 查询工单列表无分页
     *
     * @param ids 批量id
     * @return List<PsmWorkOrderVO> 返回派工单列表
     */
    List<PsmWorkOrderVO> selectPsmWorkOrders(String... ids);
    /**
     * 删除派工单
     *
     * @param id id
     * @return boolean 删除成功与否
     */
    boolean removePsmWorkOrders(String id);
    /**
     * 查看详情
     *
     * @param id 派工单id
     * @return PsmWorkOrderDetailVO 派工单详情VO类
     */
    PsmWorkOrderDetailVO selectPsmWorkOrderDetail(String id);
    /**
     * 制单
     *
     * @param voucherDTO 派工单-制单VO
     * @return int 返回成功与否
     */
    boolean insertPsmWorkOrder(VoucherDTO voucherDTO);
    /**
     * 制单
     *
     * @param voucherDTO 派工单-结单VO
     * @return int 返回成功与否
     */
    boolean updatePsmWorkOrder(VoucherDTO voucherDTO);

}
